package com.splunk.hiring.imov.persist.db.impl;

import java.util.List;

import javax.transaction.Transactional;

import org.springframework.stereotype.Repository;

import com.splunk.hiring.imov.entity.Tag;
import com.splunk.hiring.imov.persist.db.TagDao;

@Repository
@Transactional
public class TagDaoImpl extends AbstractDaoImpl implements TagDao{

	@SuppressWarnings("unchecked")
	@Override
	public List<Tag> getTagsByMovieId(Long movieId) {
		return (List<Tag>)getHibernateTemplate().find("from Tag t where t.movie.id=?", movieId);
	}

}
